1. Field of the Invention
The present invention relates to a semiconductor integrated apparatus having a black level correction circuit for an image sensor and a black level correction method therefor.
2. Description of the Related Art
A semiconductor image sensor such as a CMOS (complementary metal-oxide semiconductor) sensor changes an output level thereof due to a temperature change, et cetera, resulting in an imaged image becoming lighter or darker due to a temperature change even if the same imaging object is imaged. In order to eliminate such a problem, a fluctuation of an output of an image sensor due to a temperature change, et cetera, is suppressed by shading a part thereof from light and subtracting an pixel value of the part shaded from light from that of the part exposed thereto of the image sensor.
FIG. 1 shows a configuration of a conventional image sensor and a circuit for correcting a black level of a pixel of the image sensor.
The image sensor 11 comprises the n by n number of pixels, lets a part 11a thereof shaded from light (simply “shaded part 11a” hereinafter), and constitutes an imaging-use sensor by the other part (called “imaging part” hereinafter) 11b. The pixels of a shaded part 11a are used for figuring out the reference value for a black level at a black level correction circuit 13 described later.
Shift registers 14 and 15 are circuits for addressing a line and a column of the image sensor 11 and pixel values of the lines and columns addressed by the shift registers 14 and 15 are transmitted in sequence to be output to A/D (analog to digital) converters 12a and 12b. 
A black level correction circuit 13 figures out an average of black level pixel values for one line output from the shaded part 11a of the image sensor 11 as a black level reference value, and outputs, to an automatic gain control (AGC) circuit 16 and a color processing block 17, the difference between the pixels value output from the imaging part 11b and the black level reference value.
The automatic gain control circuit 16 outputs a gain control signal for controlling a gain of a variable gain amplifier (not shown herein) at the front stages of the A/D converters 12a and 12b to a timing generator (TG) 18.
The timing generator 18 outputs a timing signal A at the high level for a predetermined time period to make the shaded part 11a output the pixels value of a black level as shown by FIG. 2. Then, after the predetermined time, it outputs a timing signal B at the high level for reading pixel values for one line out of the imaging part 11b and outputting invalid data for a predefined time period. The black level correction circuit 13 sequentially outputs a post-correction value of valid pixels for one line synchronously with a timing signal C.
FIGS. 3, 4 and 5 show an A/D converted output code of a black level pixel value output from the shaded part 11a, that (at a pre-correction black level) of a value of valid pixels of the imaging part 11b after A/D converting and an output code of a post-correction valid pixel of a black level, which are all shown by a frame, in the case of imaging the same image by the image sensor 11.
In each of the drawings, the vertical axis of the drawing shows values of the output code, while the horizontal axis shows the frame numbers.
FIG. 3 shows the case of a black level output code (that is shown by diamond shaped dots in FIG. 3) of the shaded part 11a being approximately the same as an output code of a valid pixel (that is shown by square dots in FIG. 3) of the imaging part 11b by the unit of frame.
In this case, a post-correction output code of valid pixel (that is shown by triangle dots in FIG. 3), which is obtained by subtracting the black level output code from the pre-correction output code of a valid pixel, shows hardly a difference between frames, and therefore there is hardly a difference in brightness between the frames.
FIG. 4 shows output codes of a black level and valid pixel in the case of a change in an output code of the shaded part 11a and that in an output code of the imaging part 11b fluctuating in the unit of frame.
In this case, a post-correction output code of valid pixel, which is obtained by subtracting the black level output code from the pre-correction output code of a valid pixel, fluctuates in great deal by the unit of frame and therefore there is a large difference in brightness between frames.
FIG. 5 exemplifies a case of controlling a gain of the variable gain amplifier for amplifying an output of the image sensor 11.
In this case, an output code (a valid pixel after a black level correction), which is obtained by subtracting the black level output code from the pre-correction output code of a valid pixel, fluctuates in great deal by the unit of frame and therefore there is a large difference in brightness between the frames.
As a method for calculating a black level reference value, for example a patent document 1 notes a method for updating the black level reference data from the average of the current one line black level, or the average of black level of one frame, and the black level reference data of the previous time, in order to prevent a drastic change in the black level.
Meanwhile, a patent document 2 notes a method for removing an influence of a dark current changing over time by detecting the dark current at a predetermined time interval for correcting a screen image signal in an imaging apparatus which uses a CMOS imaging device.
Incidentally, in the case of a variable gain amplifier amplifying the pixels value detected by an image sensor, a change in gains changes a black level value amplified by the variable gain amplifier, resulting in automatically updating a black level reference value.
However, in the case of calculating a black level reference value from the average brightness of a plurality of the previous frames, a change in black level value output from the variable gain amplifier causes a gradual change in the black level reference value. This brings forth a problem of the black level reference value taking time for converging on a appropriate value.
[Patent document 1] laid-open Japanese patent application publication No. 2002-281343
[Patent document 2] laid-open Japanese patent application publication No. 2004-7068